package com.jubao.ejb.dao;

import java.io.Serializable;
import java.util.List;

import com.jubao.ejb.entity.Coupon;
import com.jubao.ejb.entity.CouponItem;

public interface CouponDao extends Serializable {

	/**
	 * Save Coupon
	 * 
	 * @param coupon
	 * @return
	 */
	public Coupon saveCoupon(Coupon coupon);

	/**
	 * Find Coupon by sysId
	 * 
	 * @param couponSysId
	 * @return
	 */
	public Coupon findCoupon(long couponSysId);

	/**
	 * Find coupon by id
	 * 
	 * @param couponId
	 * @return
	 */
	public Coupon findCoupon(String couponId);

	/**
	 * Get Coupon List 
	 * 
	 * @param storeSysId
	 * @param pgno
	 * @param pgsize
	 * @return
	 */
	public List<Coupon> getCouponList(long storeSysId, int pgno, int pgsize);

	/**
	 * Get Count of Coupons
	 * 
	 * @param storeSysId
	 * @return
	 */
	public long getCouponCount(long storeSysId);

	/**
	 * Save Coupon Item
	 * 
	 * @param couponItem
	 * @return
	 */
	public CouponItem saveCouponItem(CouponItem couponItem);

	/**
	 * Find Coupon Item by sysid 
	 * 
	 * @param couponItemSysId
	 * @return
	 */
	public CouponItem findCouponItem(long couponItemSysId);

	/**
	 * Find Coupon Item by id
	 * 
	 * @param couponItemId
	 * @return
	 */
	public CouponItem findCouponItem(String couponItemId);

	/**
	 * Get coupon item list
	 * 
	 * @param storeSysId
	 * @param couponSysId
	 * @param userSysId
	 * @param pgno
	 * @param pgsize
	 * @return
	 */
	public List<CouponItem> getCouponItemList(long storeSysId, long couponSysId,long userSysId, int pgno, int pgsize);

	/**
	 * Get count of coupon items
	 * @param storeSysId
	 * @param couponSysId
	 * @param userSysId
	 * @return
	 */
	public long getCouponItemCount(long storeSysId,long couponSysId, long userSysId);
}
